package com.wushi.codegen.base;

public class ResultUtil {
	
	public static Result<Object> success(Object object) {
		Result<Object> result=new Result<Object>();
		result.setCode(0);
		result.setMessage("sucess");
		result.setData(object);
		return result;
	}
	
	public static Result<Object> success(){
		return success(null);
	}

	public static Result<Object> fail(int code, String message){
		Result<Object> result=new Result<Object>();
		result.setCode(code);
		result.setMessage(message);
		result.setData(null);
		return result;
	}
}
